﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using YX.Properties;

namespace YX
{
    class MyPlane :FatherPlane
    {
        private static Image image = Resources.hero1;
        public MyPlane(int x, int y,  int life, Direction dir)
            : base(x, y, image, 0, life, dir)
        {

        }
        public override void Draw(Graphics g)
        {
            g.DrawImage(image, this.X, this.Y, image.Width / 2, image.Height / 2);
        }
        public void PlaneMove( MouseEventArgs e)
        {
            this.X = e.X-25;
            this.Y = e.Y-31;
        }

        public override void It_Over()
        {
            SingleClass.GetSingle.AddBaseClase(new MyBoom(this.X, this.Y));

        }
        public void Fire()
        {
            SingleClass.GetSingle.AddBaseClase(new MyBullt(this,10,3));
        }
    }
}
